home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / sun4.md / limits.h < prev    next >
C/C++ Source or Header  |  1989-03-31  |  2KB  |  78 lines

  1. /*
  2.  * limits.h --
  3.  *
  4.  *    Declares machine-dependent limits on the values that can
  5.  *    be stored in integer-like objects.
  6.  *
  7.  * Copyright 1988 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  * $Header: /sprite/src/lib/include/sun3.md/RCS/limits.h,v 1.3 89/02/10 11:15:55 rab Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _LIMITS
  20. #define _LIMITS
  21.  
  22. /*
  23.  * Number of bits in a "char":
  24.  */
  25. #define CHAR_BIT        8
  26.  
  27. /*
  28.  * Minimum and maximum values for a "signed char":
  29.  */
  30. #define SCHAR_MIN        (-128)
  31. #define SCHAR_MAX        127
  32.  
  33. /*
  34.  * Maximum value for an "unsigned char":
  35.  */
  36. #define UCHAR_MAX        255
  37.  
  38. /*
  39.  * Minimum and maximum values for a "char":
  40.  */
  41. #define CHAR_MIN        (-128)
  42. #define CHAR_MAX        +127
  43.  
  44. /*
  45.  * Minimum and maximum values for a "short int":
  46.  */
  47. #define SHRT_MIN        0x8000
  48. #define SHRT_MAX        0x7fff
  49.  
  50. /*
  51.  * Maximum value for an "unsigned short int":
  52.  */
  53. #define USHRT_MAX        0xffff
  54.  
  55. /*
  56.  * Minimum and maximum values for an "int":
  57.  */
  58. #define INT_MIN            0x80000000
  59. #define INT_MAX            0x7fffffff
  60.  
  61. /*
  62.  * Maximum value for an "unsigned int":
  63.  */
  64. #define UINT_MAX        0xffffffff
  65.  
  66. /*
  67.  * Minimum and maximum values for a "long int":
  68.  */
  69. #define LONG_MIN        0x80000000
  70. #define LONG_MAX        0x7fffffff
  71.  
  72. /*
  73.  * Maximum value for an "unsigned long int":
  74.  */
  75. #define ULONG_MAX        0xffffffff
  76.  
  77. #endif /* _LIMITS */
  78.